<?php /* EL PSY CONGROO */    	 	 	  	
require '../../../../zb_system/function/c_system_base.php';    				    
require '../../../../zb_system/function/c_system_admin.php';    	  	  	 
$zbp->Load();    	 	  			
$action='root';    						  
if (!$zbp->CheckRights($action)) {$zbp->ShowError(6);die();}     	      
if (!$zbp->CheckPlugin('San_Rabbit')) {$zbp->ShowError(48);die();}    			    	
$blogtitle='主题配置';     		 	   
require $blogpath . 'zb_system/admin/admin_header.php';    	 		  		
require $blogpath . 'zb_system/admin/admin_top.php';     		  		 
require $blogpath . 'zb_users/theme/San_Rabbit/plugin/header.php';    		 	 	  
if(isset($_POST['Data'])){    	 	  	 	
    if (function_exists('CheckIsRefererValid')) CheckIsRefererValid();    						 	
	foreach($_POST['Data'] as $key=>$val){      	  	  
	   $zbp->Config('San_Rabbit')->$key = $val;      		 		 
	}    	  			 	
	$zbp->SaveConfig('San_Rabbit');    	 			   
	$zbp->ShowHint('good');      			 		
}     			 	  
?>

<div class="page">
          
            <div class="left-admin-menu">
                <nav class="admin-menu">
                  <ul id="treeMenu" class="tree tree-menu" data-ride="tree">
                    <?php San_Rabbit_SubMenu(4);?>
                    
                  </ul>
                </nav>
            </div>
            <div class="content">
            	
                <div class="panel">
                    <div class="panel-heading">
                        <strong><i class="icon icon-paste"></i>&nbsp;&nbsp;首页设置</strong>
                    </div>
                    <div class="table-border">
                         <form id="form1" name="form1" method="post">
                            <table class="table table-line-height table-details table-hover ">
                                <tbody>
								<tr>
                                    <td>
						<p align="center">是否开启SEO</p>
					</td>
					<td>
						<p align="left">
							<input type="text" id="seo" name="Data[seo]" class="checkbox" value="<?php echo $zbp->Config('San_Rabbit')->seo;?>"/>
						</p>
					</td>
					<td><p align="left">是否开启</p></td>
				</tr>
				<tr>
					<td>
						<p align="center">标题分隔符</p>
					</td>
					<td>
						<p align="left">
							<input type="text" name="Data[separator]" id="separator" class="form-control" value="<?php echo $zbp->Config('San_Rabbit')->separator;?>" />
						</p>
					</td>
					<td><p align="left">可以使用 | , _ , - , > 等，默认是 |</p></td>
				</tr>
				<tr>
					<td>
						<p align="center">首页标题</p>
					</td>
					<td>
						<p align="left">
							<input type="text" name="Data[h_title]" id="h_title" class="form-control" value="<?php echo $zbp->Config('San_Rabbit')->h_title;?>" />
						</p>
					</td>
					<td><p align="left">可以添加首页关键词</p></td>
				</tr>
				
				<tr>
					<td>
						<p align="center">首页关键词</p>
					</td>
					<td>
						<p align="left">
							<textarea name="Data[Keywords]" type="text" id="Keywords" style="width:98%;"><?php echo $zbp->Config('San_Rabbit')->Keywords;?></textarea>
						</p>
					</td>
					<td><p align="left">可以添加首页关键词</p></td>
				</tr>
				<tr>
					<td>
						<p align="center">首页描述</p>
					</td>
					<td>
						<p align="left">
							<textarea name="Data[Description]" type="text" id="Description" style="width:98%;"><?php echo $zbp->Config('San_Rabbit')->Description;?></textarea>
						</p>
					</td>
					<td><p align="left">可以添加首页描述</p></td>
				</tr>
				<tr>
					<td>
						<p align="center">是否开启幻灯片</p>
					</td>
					<td>
						<p align="left">
							<input type="text" id="s_slide" name="Data[s_slide]" class="checkbox" value="<?php echo $zbp->Config('San_Rabbit')->s_slide;?>"/>
						</p>
					</td>
					<td><p align="left">是否开启</p></td>
				</tr>
				<tr>
					<td>
						<p align="center">友情链接</p>
					</td>
					<td>
						<p align="left">
							<input type="text" id="sylink" name="Data[sylink]" class="checkbox" value="<?php echo $zbp->Config('San_Rabbit')->sylink;?>"/>
						</p>
					</td>
					<td><p align="left">首页是否显示友情链接</p></td>
				</tr>
				
				<tr>
					<td>
						<p align="center">幻灯片右侧文章</p>
					</td>
					<td>
						<p align="left">
							<input name="Data[coid]" type="text" id="coid" style="width:98%;" value="<?php echo $zbp->Config('San_Rabbit')->coid;?>" />
						</p>
					</td>
					<td><p align="left">添加文章ID，只允许添加两篇文章ID，请用英文【,】符号分隔！</p></td>
				</tr>
                  
                                    <tr>
                                        <td></td>
                                        <td>
                                            <input type="hidden" name="csrfToken" value="<?php echo $zbp->GetCSRFToken(); ?>">
                                            <button type="Submit" class="btn btn-primary">提交</button>
                                          
                                        </td>
                                    </tr> 
                                </tbody>
                            </table>
                        </form>
                    </div>
                </div>
                
                

            </div>
        <div class="copyright">
            <p>三十工作室</p>
        </div>
		
	</div>	

<?php
require $blogpath . 'zb_system/admin/admin_footer.php';    	 	 	   
RunTime();    			   		
?>